package com.zut.Aop.AspectJ;

import javax.annotation.Resource;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;


@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:Application01.xml")
public class Test01 {
	@Resource(name="userDao")
	private UserDao userDao;
	@Test
public void demo() {
		/*
		 * ApplicationContext applicationContext = new
		 * ClassPathXmlApplicationContext("Application01.xml"); UserDao userDao =
		 * (UserDao) applicationContext.getBean("userDao");
		 */
	userDao.addUser();
	userDao.deleteUser();
	userDao.updateUser();
	userDao.findUser();
	
}
}
